import request from './request'

// 秒杀管理API
export const seckillApi = {
  // 查询秒杀
  getSeckillList(data) {
    return request({
      url: '/seckill/findSeckill',
      method: 'post',
      data
    })
  },

  // 新增秒杀
  addSeckill(data) {
    return request({
      url: '/seckill/insertSeckill',
      method: 'post',
      data
    })
  },

  // 修改秒杀
  updateSeckill(data) {
    return request({
      url: '/seckill/updateSeckill',
      method: 'put',
      data
    })
  },

  // 删除秒杀
  deleteSeckill(id) {
    return request({
      url: '/seckill/deleteSeckill',
      method: 'delete',
      params: { id }
    })
  }
}